# -*- coding: utf-8 -*-
import datetime
#from fileman.settings import ANONYMOUSES
#from django.contrib.auth.models import User

class Current_Date_Set(object):
    def process_request(self, request):
        if request.method == 'POST':
            d = datetime.datetime.now()
            #
            if request.POST.has_key('ncurmonth'):
                try:
                    if int(request.POST['ncurmonth']) != 0:
                        imonth = int(request.POST['ncurmonth'])  
                    else:
                        imonth = d.month
                except:
                    imonth = d.month
                request.session['processed_month'] = imonth    
            #     
            if request.POST.has_key('ncuryear'):
                try:
                    if int(request.POST['ncuryear'])  != 0:
                        iyear = int(request.POST['ncuryear']) 
                    else: 
                        iyear = d.year
                except:
                    iyear = d.year
                request.session['processed_year'] = iyear